{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "7000cfd8-e9f3-4f38-80da-766b79b48885",
   "metadata": {},
   "source": [
    "# Dirac Function\n",
    "## Definition\n",
    "for any infinitely differentiable function $f(x)$, if satisfy\n",
    "\n",
    "$$\n",
    "    \\int_{-\\infty}^{+\\infty}{\\delta(t)f(t)}dt = \\mathop{lim}\\limits_{\\epsilon \\to 0}\\int_{-\\infty}^{+\\infty}{\\delta_{\\epsilon}(t)f(t)}dt\n",
    "$$\n",
    "\n",
    "where\n",
    "\n",
    "$$\n",
    "\\delta_{\\epsilon}(t) = \n",
    "\\left\\{\n",
    "\\begin{array}{ll}\n",
    "0, & t<0 \\\\\n",
    "\\frac{1}{\\epsilon}, & 0 \\le t \\le \\epsilon \\\\\n",
    "0, & t> \\epsilon \n",
    "\\end{array}\n",
    "\\right .\n",
    "$$\n",
    "\n",
    "we note $\\mathop{lim}\\limits_{\\epsilon \\to 0}\\delta_{\\epsilon}(t) = \\delta(t)$"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e6e36f4d-76e9-4812-b8c5-2b322a35503d",
   "metadata": {},
   "source": [
    "## Properties\n",
    "1. important properties for 1d dirac function\n",
    "\n",
    "$$\n",
    "    \\int_{-\\infty}^{+\\infty}{\\delta(t-t_0)f(t)}dt = f(t_0)\n",
    "$$\n",
    "$$\n",
    "    \\int_{-\\infty}^{+\\infty}{\\delta^{(n)}(t-t_0)f(t)}dt = {(-1)}^nf^{(n)}(t_0)\n",
    "$$\n",
    "\n",
    "2. relationship between unit pulse and unit step functioin\n",
    "\n",
    "$$\n",
    "    \\int_{-\\infty}^{t} \\delta(\\tau)d\\tau = u(t)\n",
    "$$\n",
    "$$\n",
    "    \\frac{d}{dt}u(t) = \\delta(t)\n",
    "$$\n",
    "\n",
    "3. important properties for 2d dirac function\n",
    "\n",
    "$$\n",
    "    \\delta(x-x_0, y-y_0) = \\delta(x-x_0) \\delta(y-y_0)\n",
    "$$\n",
    "$$\n",
    "    \\int_{-\\infty}^{+\\infty}{\\delta(x-x_0, y-y_0)f(x,y)} dxdy = f(x_0,y_0)\n",
    "$$"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9b3564c3-e8f8-4bac-883c-0aff969b67d5",
   "metadata": {},
   "source": [
    "# Fourier Transformation\n",
    "## Properties\n",
    "1. linear\n",
    "$$\n",
    "   \\mathscr{F}[a_1f_1(t) + a_2f_2(t)] = a_1F_1(\\omega) + a_2F_2(\\omega)\n",
    "$$\n",
    "\n",
    "2. displace\n",
    "$$\n",
    "    \\mathscr{F}[f(t\\pm t_0)] = e^{\\pm j\\omega t_0}\\mathscr{F}[f(t)]\n",
    "$$\n",
    "\n",
    "3. diffrentiate\n",
    "\n",
    "$$ \n",
    "    \\mathscr{F}[f^\\prime(t)] = j\\omega\\mathscr{F}[f(t)]\n",
    "$$\n",
    "$$ \n",
    "    \\mathscr{F}[f^{(n)}(t)] = {(j\\omega)}^n\\mathscr{F}[f(t)]\n",
    "$$\n",
    "\n",
    "4. integrate\n",
    "$$ \n",
    "    \\mathscr{F}[\\int_{-\\infty}^{t}{f(t)}dt] = \\frac{1}{j\\omega}\\mathscr{F}[f(t)]\n",
    "$$\n",
    "5. Parseval Equation\n",
    "\n",
    "$$ \n",
    "    \\int_{-\\infty}^{+\\infty}{{[f(t)]}^2}dt = \\frac{1}{2\\pi}\\int_{-\\infty}^{+\\infty}{{|F(\\omega)|}^2}d\\omega\n",
    "$$"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c1ebff02-c087-48ad-b982-7e7a995061ac",
   "metadata": {},
   "source": [
    "# Laplace Transformation\n",
    "## Definition\n",
    "Revised Fourier Transfermation\n",
    "$$\n",
    "    \\varphi(t)u(t)e^{-\\beta t} (\\beta>0)\n",
    "$$\n",
    "\n",
    "then, do fourier transformation\n",
    "$$\n",
    "\\begin{array}{ll}\n",
    "G_{\\beta}(\\omega)& = & \\int_{-\\infty}^{+\\infty}{\\varphi(t)u(t)e^{-\\beta t} e^{-j\\omega t}dt} \\\\\n",
    "& = & \\int_{0}^{+\\infty}{f(t)e^{-(\\beta+j\\omega) t} dt} \\\\\n",
    "& = & \\int_{0}^{+\\infty}{f(t)e^{-s t} dt}\n",
    "\\end{array}\n",
    "$$\n",
    "where\n",
    "$$\n",
    "\\left\\{\n",
    "\\begin{array}{ll}\n",
    "s & = & (\\beta+j\\omega) \\\\\n",
    "f(t) & = & \\varphi(t)u(t)\n",
    "\\end{array}\n",
    "\\right .\n",
    "$$\n",
    "set \n",
    "$$\n",
    "    F(s) = G_{\\beta}(\\frac{s-\\beta}{j})\n",
    "$$\n",
    "we get Laplace transformation\n",
    "$$\n",
    "    \\mathscr{L}[f(t)] = F(s) = \\int_{0}^{+\\infty}{f(t)e^{-st}}dt\n",
    "$$\n",
    "\n",
    "at this point the inverse laplace transformation could be a little different\n",
    "$$\n",
    "\\begin{array}{ll}\n",
    "f(t)u(t)e^{-\\beta t} & = & \\frac{1}{2\\pi}\\displaystyle\\int_{-\\infty}^{+\\infty}{[\\displaystyle\\int_{-\\infty}^{+\\infty}{f(t)u(t)e^{-(\\beta+j\\omega) t} dt}]e^{j\\omega t} d\\omega} \\\\\n",
    "& = & \\frac{1}{2\\pi}\\displaystyle\\int_{-\\infty}^{+\\infty}{e^{j\\omega t} d\\omega[\\displaystyle\\int_{-\\infty}^{+\\infty}{f(t)u(t)e^{-(\\beta+j\\omega) t} dt}]} \\\\\n",
    "& = & \\frac{1}{2\\pi}\\displaystyle\\int_{-\\infty}^{+\\infty}{F(\\beta + j\\omega)e^{j\\omega t} d\\omega} \\space, t>0 \\\\\n",
    "f(t) & = & \\frac{1}{2\\pi}\\displaystyle\\int_{-\\infty}^{+\\infty}{F(\\beta + j\\omega)e^{(\\beta + j\\omega) t} d\\omega} \\space, t>0\\\\\n",
    "& = & \\frac{1}{2\\pi j}\\displaystyle\\int_{\\beta-j\\infty}^{\\beta+j\\infty}{F(s)e^{st} ds} \\space, t>0\n",
    "\\end{array}\n",
    "$$\n",
    "\n",
    "in the last deduction process, we use $s = \\beta + j\\omega$, then do integral substitution, replace $d\\omega$ with $\\frac{1}{j}d(\\beta + j\\omega)$. Due to the fact that $\\omega \\in (-\\infty, +\\infty)$, we got integration range as $(\\beta-j\\infty,\\beta+j\\infty)$\n",
    "we got inverse laplace transform\n",
    "$$\n",
    "    \\mathscr{L}^{-1}[F(s)] = f(t) = \\frac{1}{2\\pi j}\\displaystyle\\int_{\\beta-j\\infty}^{\\beta+j\\infty}{F(s)e^{st} ds} \\space, t>0\n",
    "$$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "1bb5494f-aeba-425f-b9e8-669e089f7092",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1000000000.9999999"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "math.exp(-0.000000001)-1 / -0.000000001"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b17c3300-79b0-45b7-9dd6-240b36c13745",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0c5bca2b-c58c-4905-b8ba-ae41704e3657",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "201a52b3-a003-461f-a335-4b7daa4b0a8f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.13"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
